import 'package:enterprise_v6_app/app/core/core.dart';
import 'package:enterprise_v6_app/app/core/ext/ext.dart';
import 'package:enterprise_v6_app/app/modules/application/basic_information/productive_process/productive_process_controller.dart';

///生产过程
class ProductiveProcessPage extends StatelessWidget {
  ProductiveProcessPage({super.key});

  final controller = Get.put(ProductiveProcessController());

  @override
  Widget build(BuildContext context) {
    return Column(
      children: controller.productiveList
          .map((e) => Container(
                margin: EdgeInsets.only(
                  left: 14.w,
                  right: 14.w,
                  top: 12.w,
                ),
                decoration: const BoxDecoration(
                    color: Colors.white,
                    borderRadius: BorderRadius.all(
                      Radius.circular(8),
                    )),
                child: Row(
                  children: [
                    AppGaps.hGap20,
                    Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        AppGaps.vGap16,
                        Text(
                          e.title,
                          style: TextStyle(
                            color: const Color(0xFF4D4D4D),
                            fontSize: 16.sp,
                          ),
                        ),
                        AppGaps.vGap16,
                        SvgPicture.asset(e.icon),
                        AppGaps.vGap16,
                      ],
                    ),
                    const Spacer(),
                    SvgPicture.asset(e.image),
                    AppGaps.hGap16,
                  ],
                ),
              ).click(() {
                controller.onClickItem(e);
              }))
          .toList(),
    );
  }
}
